import React,{Component} from 'react';
import './cardlist.scss';
import {
  Link
} from 'react-router-dom';
export default class Cardlist extends Component{
	constructor (props) {
		super(props)
	}
	render(){
		return(
			<div className="cardlist">
				<Link to={
					{
						pathname: '/shopDetail',
						state: {id: this.props.shopDetail.common_id}
					}
				}>
					<img src={this.props.shopDetail.common_image}/>
					<div className="card_content">
						<p className="card_title">{this.props.shopDetail.common_name}</p>
						<div>
							<span className="card_company">{this.props.shopDetail.shop_name}</span>
							<p className="renzheng">
								<span className="rz1"></span>
								<span className="rz2"></span>
							</p>
						</div>
						<div>
							{
								this.props.shopDetail.common_price == 0 ?
								<span className="card_money">面议</span>
								: <span className="card_money">¥ {this.props.shopDetail.common_price}</span>
							}
							<span className="card_sell">销量：{this.props.shopDetail.common_salenum}件</span>
						</div>
					</div>
				</Link>
			</div>
		)
	}
}